<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
var imageFileName = "";
var imagePath = "";
var hasSuccess = false;
var hasUpload = false;
if("<s:property value="#parameters.hasUpload"/>"=="1"){
	hasUpload = true;
}
</script>
</head>
<body>
	<form action="towdimentcodeUpload" enctype="multipart/form-data" method="post">
		<input type="file" name="doc" class="file"/>
		<input type="submit" value="上传"/>
	</form>
	<s:if test="hasUpload">
		<script type="text/javascript">
			var hasUpload = true;
		</script>
		<s:if test="hasSuccess">
			<script type="text/javascript">
				var hasSuccess = true;
				var imageFileName = "<s:property value="docFileName"/>";
				var imagePath = "<s:property value="filePath"/>/<s:property value="docTempName"/>";
			</script>
		</s:if>
	</s:if>
<script type="text/javascript">
if(hasUpload && hasSuccess){
	alert("上传成功");
	window.parent.twoDimentCodeUploaded(imageFileName,imagePath);
}else if(hasUpload){
	alert("上传失败，请上传1M以内bpm、png、gif、jpeg类型文件。");
}
</script>
</body>
</html>